#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int n,ans;
const int maxn=1e5+10;
int a[maxn];
bool vis[maxn];
int main ()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin>>n;
    for(int i=1;i<=n;i++)
    {
        cin>>a[i];
    }
    sort(a+1,a+n+1);
    int nw=n;
    for(int i=n-1;i>=1;i--)
    {
        if(a[nw]>a[i])
        {
            vis[i]=1;
            int j=nw-1;
            for(int j=nw-1;j>=1;j--)
            {
                if(vis[j]==0)
                {
                    break;
                }
            }
            nw=j;
        }
    }
    for(int i=1;i<=n;i++)
    {
        if(vis[i]==0)
        {
            ans++;
        }
    }
    cout<<ans;
    return 0;
}
/*
JS-S01359
CSP-S 2024 Diary
It is 14:05 now.
It's the first time for me to sit on the second round of CSP-S.
My target is to get over 100 points.
rp++.
14:36
T1 guess the jielun


*/
